package org.p2psimulator.entity.behavior;


public enum BehaviorTypes {

	HONEST ("HONEST"),
	SELFISH ("SELFISH"),
	MALICIOUS ("MALICIOUS"),
	EVIL ("CORRUPT"),
	DISTURBING ("DISTURBING");

	String name;
	public Behavior getBehavior(){

			switch (this){
				case EVIL: return new EvilBehavior();
				case HONEST:return new HonestBehavior();
				case SELFISH: return new SelfishBehavior();
				case DISTURBING: return new DisturbingBehavior();
				case MALICIOUS: return new MaliciousBehavior();
				default: throw new IllegalArgumentException("No correspondence between enum members");
			}
	}
	private BehaviorTypes(String name) {
		this.name = name;
	}
	public String getTypeName() {
		return name;
	}
	public void setTypeName(String name) {
		this.name = name;
	}

}
